﻿using System.Windows;

namespace Iot.AlarmDispose.WPF;

public class DataGridRowIndexHelper
{
    // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty RowIndexProperty =
        DependencyProperty.RegisterAttached("RowIndex", typeof(int), typeof(DataGridRowIndexHelper));

    public static int GetRowIndex(DependencyObject obj)
    {
        return (int)obj.GetValue(RowIndexProperty);
    }

    public static void SetRowIndex(DependencyObject obj, int value)
    {
        obj.SetValue(RowIndexProperty, value);
    }
}